<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <title>Spring Security Example </title>
</head>
<body>
<div th:if="${param.error}">
    Invalid username and password.
</div>
<div th:if="${param.logout}">
    You have been logged out.
</div>
<form th:action="@{/login}" method="post">
    <div><label> User Name : <input type="text" name="username"/> </label></div>
    <div><label> Password: <input type="password" name="password"/> </label></div>
    <div><label> verify: <input name="check" type="text" placeholder="请输入验证码" autocomplete="off">
        <span><img src="/checkCode" alt="" onclick="changeCheckCode(this)"></span>
        <script type="text/javascript">
        //图片点击事件
        function changeCheckCode(img) {
             img.src = "/checkCode?" + new Date().getTime();
        }
        </script>
    </label></div>
    <div><input type="submit" value="Sign In"/></div>
    <!--<div class="verify">
        <input name="check" type="text"
               placeholder="请输入验证码" autocomplete="off">
        <span><img src="/checkCode" alt="" onclick="changeCheckCode(this)">
     </span>
        <script type="text/javascript">
        //图片点击事件
        function changeCheckCode(img) {
             img.src = "/checkCode?" + new Date().getTime();
        }
     </script>
    </div>-->
</form>
</body>
</html>